mySettings.markupSet.replaceWith   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 1
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
// ----------------------------------------------------------------------------
2
// markItUp!
3
// ----------------------------------------------------------------------------
4
// Copyright (C) 2008 Jay Salvat
5
// http://markitup.jaysalvat.com/
6
// ----------------------------------------------------------------------------
7
// Html tags
8
// http://en.wikipedia.org/wiki/html
9
// ----------------------------------------------------------------------------
10
// Basic set. Feel free to add more tags
11
// ----------------------------------------------------------------------------
12
mySettings = {	
0 ignored issues
show
Bug introduced by
The variable mySettings seems to be never declared. Assigning variables without defining them first makes them global. If this was intended, consider making it explicit like using window.mySettings.
Loading history...
13
	onShiftEnter:  	{keepDefault:false, replaceWith:'<br />\n'},
14
	onCtrlEnter:  	{keepDefault:false, openWith:'\n<p>', closeWith:'</p>'},
15
	onTab:    		{keepDefault:false, replaceWith:'    '},
16
	markupSet:  [ 	
17
		{name:'Bold', key:'B', openWith:'(!(<strong>|!|<b>)!)', closeWith:'(!(</strong>|!|</b>)!)' },
18
		{name:'Italic', key:'I', openWith:'(!(<em>|!|<i>)!)', closeWith:'(!(</em>|!|</i>)!)'  },
19
		{name:'Stroke through', key:'S', openWith:'<del>', closeWith:'</del>' },
20
		{separator:'---------------' },
21
		{name:'Picture', key:'P', replaceWith:'<img src="[![Source:!:http://]!]" alt="[![Alternative text]!]" />' },
22
		{name:'Link', key:'L', openWith:'<a href="[![Link:!:http://]!]"(!( title="[![Title]!]")!)>', closeWith:'</a>', placeHolder:'Your text to link...' },
23
		{separator:'---------------' },
24
		{name:'Clean', className:'clean', replaceWith:function(markitup) { return markitup.selection.replace(/<(.*?)>/g, "") } },		
25
		{name:'Preview', className:'preview',  call:'preview'}
26
	]
27
}